import React from 'react';
import ReactDOM from 'react-dom';

// 💥 class是JS中的关键字，  class 写为className， React会自动转换为class
const title = React.createElement("div", { id: "box", className: "demo" }, "hello 83");


const liNode1 = React.createElement("li", null, "香蕉1")
const liNode2 = React.createElement("li", null, "香蕉2")
const liNode3 = React.createElement("li", null, "香蕉3")

// 练习2：
const ulNode = React.createElement("ul", { className: "list" }, liNode1, liNode2, liNode3)

// 💥 ReactDOM.render 全局只能用一次
// ReactDOM.render(title, document.querySelector("#root"))
ReactDOM.render(ulNode, document.querySelector("#root"))
